package com.huang.entity.result;

/**
 * @Author HuangShen
 * @Date 2022/3/4 07:47
 * @Describe 全局错误
 */
public enum RpcReErrors {

    HTTP_SUCCESS("00000200", "请求成功"),
    HTTP_INVALID_PARM("00000400", "缺少请求参数或者参数解析失败"),
    ENTITY_NOT_FOUND("00000404", "资源未找到"),
    HTTP_REFUSE_REQUEST("00000403", "拒绝请求"),
    HTTP_NOT_SUPPORT_METHOD("00000405", "不支持的请求方法"),
    HTTP_NOT_ACCEPTEABLE("00000406", "响应请求不接受"),
    SERVICE_ERR("00000500", "服务错误"),
    AUTH_ERR("00001005", "鉴权错误"),
    RPC_TIME_OUT("00001200", "RPC请求超时"),
    RPC_NOT_FOUND_SERVICE("00001202", "RPC未找到服务"),
    RPC_NOT_DATA("00001203", "RPC未找到数据"),
    SERVICE_BIZ_ERR("00001270", "服务端业务错"),
    MYSQL_OPERATE_ERR("00001400", "Mysql数据库操作失败"),
    MYSQL_INSERT_ERR("00001401", "Mysql插入失败"),
    MYSQL_UPDATE_ERR("00001402", "Mysql数据库更新失败"),
    MYSQL_DELETE_ERR("00001403", "Mysql数据删除失败"),
    MYSQL_QUERY_ERR("00001404", "Mysql数据查询失败"),
    REDIS_TIME_OUT("00001410", "Reids超时"),
    HAZELCAST_ERR("00001411", "使用Hazelcast异常"),
    MQ_MSG_SEND_FAIL("00001420", "MQ消息发送失败"),
    RATE_LIMIT("00000556", "限流异常"),
    CURRENT_LIMITING_WARNING("00001600", "限流预警"),
    CUURENT_LIMITING_DWONGRADING("00001601", "限流降级"),
    INVALID_PAGE("00001900", "分页参数不合法"),
    INVALID_PARM("00001901", "请求参数不合法，请注意检查");

    private String errCode;
    private String errMsg;

    RpcReErrors(String errCode, String errMsg) {
        this.errCode = errCode;
        this.errMsg = errMsg;
    }

    public String getErrCode() {
        return errCode;
    }

    public void setErrCode(String errCode) {
        this.errCode = errCode;
    }

    public String getErrMsg() {
        return errMsg;
    }

    public void setErrMsg(String errMsg) {
        this.errMsg = errMsg;
    }
}
